﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="PropertyMeta.cs" company="Data Ductus Malmö">
//   (c) 2010 - 2012 Data Ductus Malmö AB
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace DataDuctus.Snmp.Persistor.Core.MetaData
{
  using System.ComponentModel;
  using System.Reflection;

  using DataDuctus.Snmp.Persistor.Core.Attributes;

  /// <summary>
  /// The property meta.
  /// </summary>
  public class PropertyMeta
  {
    #region Public Properties

    /// <summary>
    /// The property access.
    /// </summary>
    public PropertyAccess Access { get; set; }

    /// <summary>
    /// The <see cref="TypeConverter"/> used in conversion.
    /// </summary>
    public TypeConverter Converter { get; set; }

    /// <summary>
    /// Documentation of class.
    /// </summary>
    public string Description { get; set; }

    /// <summary>
    /// If this property is a index or just columnar/scalar value.
    /// </summary>
    public bool IsIndex { get; set; }

    /// <summary>
    /// The maximum length of the value.
    /// </summary>
    public int MaxLength { get; set; }

    /// <summary>
    /// The actual .net property.
    /// </summary>
    public PropertyInfo Property { get; set; }

    /// <summary>
    /// Relative oid from <see cref="ClassMeta.Oid"/>.
    /// </summary>
    public int SubOid { get; set; }

    #endregion
  }
}